package com.medisched.medisched.service.impl;

import com.medisched.medisched.domain.Leaveapplication;
import com.medisched.medisched.mapper.LeaveapplicationMapper;
import com.medisched.medisched.service.ILeaveapplicationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 请假记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-15
 */
@Service
public class LeaveapplicationServiceImpl implements ILeaveapplicationService
{
    @Autowired
    private LeaveapplicationMapper leaveapplicationMapper;

    /**
     * 查询请假记录
     * 
     * @param id 请假记录主键
     * @return 请假记录
     */
    @Override
    public Leaveapplication selectLeaveapplicationById(Long id)
    {
        return leaveapplicationMapper.selectLeaveapplicationById(id);
    }

    /**
     * 查询请假记录列表
     * 
     * @param leaveapplication 请假记录
     * @return 请假记录
     */
    @Override
    public List<Leaveapplication> selectLeaveapplicationList(Leaveapplication leaveapplication)
    {
        return leaveapplicationMapper.selectLeaveapplicationList(leaveapplication);
    }

    /**
     * 新增请假记录
     * 
     * @param leaveapplication 请假记录
     * @return 结果
     */
    @Override
    public int insertLeaveapplication(Leaveapplication leaveapplication)
    {
        return leaveapplicationMapper.insertLeaveapplication(leaveapplication);
    }

    /**
     * 修改请假记录
     * 
     * @param leaveapplication 请假记录
     * @return 结果
     */
    @Override
    public int updateLeaveapplication(Leaveapplication leaveapplication)
    {
        return leaveapplicationMapper.updateLeaveapplication(leaveapplication);
    }

    /**
     * 批量删除请假记录
     * 
     * @param ids 需要删除的请假记录主键
     * @return 结果
     */
    @Override
    public int deleteLeaveapplicationByIds(Long[] ids)
    {
        return leaveapplicationMapper.deleteLeaveapplicationByIds(ids);
    }

    /**
     * 删除请假记录信息
     * 
     * @param id 请假记录主键
     * @return 结果
     */
    @Override
    public int deleteLeaveapplicationById(Long id)
    {
        return leaveapplicationMapper.deleteLeaveapplicationById(id);
    }
}
